package com.smartthinking.CICPNL.home.activity;

import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Intent;
import android.content.res.Configuration;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.webkit.WebView;
import android.webkit.WebViewClient;

import com.smartthinking.CICPNL.R;

public class Web extends Activity {

	private String putWEB;
	private Intent intent;
	private boolean be = false;
	public int EVEIDR;

	public void voidFinish(View V) {
		finish();

	}
	public void onConfigurationChanged(Configuration newConfig) {
		super.onConfigurationChanged(newConfig);

		// Checks the orientation of the screen
		 
	}
	public void abrirMenuLateral(View V) {
		intent = new Intent(Web.this, MenuLateral.class);

		startActivity(intent);
	}

	@Override
	public void onBackPressed() {
	}

	@SuppressLint("NewApi")
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.ui_web);

		EVEIDR = Utilities.EVE_IDR;
		
		Bundle extras = getIntent().getExtras();
		if (extras != null) {

			this.putWEB = extras.getString("PUTWEB");

		}

		final String loadUrl = putWEB;
 

		WebView wv = (WebView) findViewById(R.id.webView1);

		wv.getSettings().setJavaScriptEnabled(true);
		wv.getSettings().setPluginsEnabled(true);

		wv.setWebViewClient(new WebViewClient() {
			@Override
			public boolean shouldOverrideUrlLoading(WebView view, String url) {
				view.loadUrl(url);
				return true;
			}
		});
		wv.loadUrl(loadUrl);

	}

}
